<div class="col_02" id="rightside">
	<div class="col_02_01" id="sysContent_box">
		<div class="main-wrap">
			<div class="m-t">
				<h2>Groups</h2>
			</div>
			<div class="m-c">
				<div style="margin-bottom:20px">Here you can add and edit groups to which you can send email campaigns</div>
					{if $err!=''}
					<p class="title1" style="color:red;font-size:12px">{$err}</p>
					{/if}
					<form action="groups.php?action=editgroup"  method="POST" >
					<table width="100%" class="table_style">
						<tr>
							<td>Group Title:</td>
							<td colspan="2">
							  <input  type="text" name="cgp_title" maxlength="200" value="{$s.cgp_title}" style="width:330px">
							</td>
						</tr>
						<tr>
							<td>Group Description:</td>
							<td colspan="2">
								<textarea name="cgp_description" style="width:330px;height:100px">{$s.cgp_description}</textarea>
							</td>
						</tr>
						<tr>
							<td colspan="3" align="center">
								<input name="editId" value="{$s.cgp_id}" type="hidden">
								<input class="bginput button-secondary" accesskey="y" type="submit" name="submit" value=" {$addEdit} Group ">
								{if $s.cgp_id > 0}
								<input class="bginput button-secondary" type="button" name="Input" value=" Add New Group " onclick="window.location.href='groups.php'">
								{else}
								<input class="bginput button-secondary" accesskey="r" type="reset" name="Input" value=" Cancel ">					{/if}
							</td>
						</tr>
					</table>
					</form>
		</div>
	</div>
</div>
<div class="col_02_02" id="side_box">
	<div class="signIn">
		<h2 class="m_t m_t_gray">Member  Center</h2>
		<div class="m_c">
			<div class="mySigned" id="J_sign_form">
				<div id="loginboxx">
					<p class="info">Welcome, <span class="u_name">{$uname}</span>!</p>
					<p class="lnk_panel"><a href="settings.php" class="lnk_arrow">My Account</a></p>
					
					<p class="lnk_panel"><a href="#" onclick="return ajax_out()" class="lnk_arrow">Sign Out</a><div id="loadp"></div></p>
				</div>
			</div>
		</div>
		<div class="m_f"></div>
	</div>
	{if $isTr}
	<div class="panel_box mt_10">
		<h2 class="m_t m_t_gray">Join a Chat </h2>
		<div class="m_c">
			<div>
				<ul>
					<li><a href="findchats.php">Skype Chat</a></li>
					<li><a href="findwebinars.php">Webinars</a></li>
				</ul>
			</div>
			<p class="info"><a href="#"></a></p>							
		</div>
		<div class="m_f"></div>
	</div>
	{/if}
</div>
<div class="clearfix"></div>

<div class="module_box mt_10" id="findResults">
	<div class="m_c">
		<hr />
	  <form method="POST" action="groups.php?action=search">
			<table width="100%" border="0" cellpadding="4" cellspacing="1" >
				<tr><td width="80">Group Title: </td><td><input type="input" name="keywords" value="{$keywords}" style="width:220px"/> &nbsp; <input type="submit" name="search" value=" Search " class="button-secondary"><input type="reset" value=" Clear " onclick="location.href='groups.php'"></td></tr>
			</table>
	  </form>
	{$page}
	  <form method="POST" action="groups.php?action=delGroup" onsubmit="javascript:return confirm('Sure you want to delete?');">
	  <table width="100%" border="0" cellpadding="4" cellspacing="1" class="tableGrey">
              <tr>
				<th>Group</th>
				<th>Members</th>
				<th>Date Created</th>
				<th>Action</th>
				<th><input type="submit" value="Delete" class="button-secondary"></th>
              </tr>
	      {section name=custom loop=$grouplist}
              <tr  class="hotline {cycle values="odd,even"}">
		<td>{$grouplist[custom].cgp_title}</td>
		<td>{$grouplist[custom].members}</td>
		<td>{$grouplist[custom].cgp_created}</td>
		<td><a href="groups.php?editId={$grouplist[custom].cgp_id}">Edit</a></td>
		<td><input type="checkbox" name="delId[]" value="{$grouplist[custom].cgp_id}"></td>
              </tr>
	      {sectionelse}
               <tr  class="hotline {cycle values="odd,even"}">
                <td colspan="8"><font color=red>No Groups</font></td>
               </tr>
	      {/section}
          </table>
		  </form>
        {$page} 
		<div><input type="button" name="back" value=" Back " onclick="location.href='groups.php'" class="button-secondary"/></div>
</div>
</div>
</div>
				</div>
			</div>
		</div>
	</div>
</section>